package com.go.where.family.service.impl;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.UUID;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.go.where.family.dao.CustomerAttentionDao;
import com.go.where.family.pojo.CustomerAttentionInfo;
import com.go.where.family.service.CustomerAttentionService;

@Service("customerAttentionService")
public class CustomerAttentionServiceImpl implements CustomerAttentionService {

	@Resource(name = "customerAttentionDao")
	private CustomerAttentionDao customerAttentionDao;

	@Override
	public int save(CustomerAttentionInfo customerInfo) {
		customerInfo.setId(UUID.randomUUID().toString());
		customerInfo.setAttentionTime(new Date());
		return customerAttentionDao.insert(customerInfo);
	}

	@Override
	public int delete(CustomerAttentionInfo customerAttentionInfo) {
		return customerAttentionDao.delete(customerAttentionInfo);
	}

	@Override
	public List<CustomerAttentionInfo> queryList(Map<String, Object> map) {
		return customerAttentionDao.queryT(map);
	}

	@Override
	public CustomerAttentionInfo queryParameter(CustomerAttentionInfo customerAttentionInfo) {
		return customerAttentionDao.queryParameter(customerAttentionInfo);
	}

	@Override
	public int update(CustomerAttentionInfo customerAttentionInfo) {
		return customerAttentionDao.update(customerAttentionInfo);
	}

	@Override
	public List<String> queryByFollowed(CustomerAttentionInfo customerAttentionInfo) {
		return customerAttentionDao.queryByFollowed(customerAttentionInfo);
	}

}
